home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / Origami / install_origami < prev    next >
Text File  |  1996-09-26  |  7KB  |  305 lines

  1. (set @app-name "Origami Folding Editor")
  2.  
  3. ;{{{}}}
  4. ;{{{  message, when started from CLI
  5. (if (= @icon "")
  6.   (
  7.     message (
  8.       "Please start the installation with the install-icon next time."
  9.       "This will set all paths and names correct."
  10.     )
  11.   )
  12.   (
  13.     (set @execute-dir (pathonly @icon))
  14.   )
  15. )
  16. ;}}}
  17.  
  18. (complete 0)
  19.  
  20. ;{{{  binaries
  21. ;{{{  print new version number
  22. ;(set x (getversion ("origami")))
  23. ;(set x1 (/ x 65536))
  24. ;(set x2 (- x (* x1 65536)))
  25.  
  26. (set y (getversion ("bin/origami")))
  27. (set y1 (/ y 65536 ) )
  28. (set y2 (- y (* y1 65536 ) ) )
  29.  
  30. (if
  31.   (not
  32.     (askbool
  33.       (prompt
  34.         "Do you want to install the new origami version ?\n"
  35.  ;       ("Your old version is %ld.%ld.\n" x1 x2)
  36.         ("The new version is %ld.%ld.\n" y1 y2)
  37.         "Warning : This display shows only the first two numbers of the "
  38.         "Origami version. Please use the CLI Version command to get "
  39.         "the correct version number !"
  40.       )
  41.       (help
  42.         "This requester enables you to check the old and new versions "
  43.         "and install only a version that is newer than your old."
  44.       )
  45.       (default 1)
  46.     )
  47.   )
  48.   (
  49.     (exit (quiet))
  50.   )
  51. )
  52. ;}}}
  53.  
  54. (working "Copying binaries...")
  55. (copyfiles
  56.   (prompt "Installing binaries.")
  57.   (help "You can choose all binaries you would like to install.\n"
  58.         "The various parts of the Origami distribution are :\n\n"
  59.         "Origami : the main editor binary\n\n"
  60.         "Keybind : the OCL-compiler. You will need this binary when you want to change the default keybinding.\n\n"
  61.         "Oripager : a pager you can use to display files in origamis text display area blockwise.\n\n"
  62.         "Dirfold : a  tool to make a file containing filed-folds for a directory.\n\n"
  63.         "Viewrc : a tool to view the rc-files (compiled binding files)\n\n"
  64.         "Orisort : a special sort used by keybind to sort the describe-bindings-section\n\n"
  65.         "GetKeyCode : a tool to get the keycode of keyboard keys. This is useful, when you make your own bindings\n\n"
  66.         @copyfiles-help
  67.   )
  68.   (source "bin")
  69.   (dest "C:")
  70.   (pattern "~(.#?)")
  71.   (infos)
  72.   (confirm average)
  73. )
  74. ;}}}
  75.  
  76. (complete 20)
  77.  
  78. ;{{{  rc-files
  79. ;{{{  test existance of .origamirc file & create ...
  80. (if (NOT (exists "bin/.origamirc"))
  81.   (
  82.     (working "Making rc-file using keybind.\nPlease wait ...")
  83.     (set olddir @execute-dir)
  84.     (set @execute-dir ("%s/bindings" olddir))
  85.     (run "/bin/keybind -O -o /bin/.origami -L \"/bindings;fun\" amiga.keys"
  86.       (prompt "The rc-files do not exist. Create them ?\n"
  87.         "Making amiga.keys bindings using the keybind command.\n"
  88.         "Please wait, this may take some time.")
  89.       (help "You will need the rc files (compiled bindings) to run origami.")
  90.       (confirm)
  91.     )
  92.     (set @execute-dir olddir)
  93.   )
  94. )
  95. ;}}}
  96. ;{{{  test existance of .origamirc file & quit ...
  97. (if (NOT (exists "bin/.origamirc"))
  98.   (abort "There is still no .origamirc file (creation error ??)"
  99.     "New origami version will not work !"
  100.   )
  101. )
  102. ;}}}
  103.  
  104. (complete 40)
  105.  
  106. ;{{{  set rcdir
  107. (set rcdir
  108.   (askdir
  109.     (prompt "Please select the rc directory." )
  110.     (help
  111.       "In the rc directory the compiled bindings will be installed !\n"
  112.       "You will need them to run origami !\n\n"
  113.       "If you select a directory different to S:, you will have to set the"
  114.       "ORIPATH environment variable or use the -R option.\n\n"
  115.       @askdir-help
  116.     )
  117.     (default "S:")
  118.   )
  119. )
  120. (set @default-dest rcdir)
  121. ;}}}
  122.  
  123. ;{{{  copy rc files
  124. (working "Copying rc-files")
  125. (copyfiles
  126.   (prompt "Please select the rc directory." )
  127.   (help
  128.     "In the rc directory the compiled bindings will be installed !\n"
  129.     "You will need them to run origami !\n\n"
  130.     "If you select a directory different to S:, you will have to set the"
  131.     "ORIPATH environment variable or use the -R option.\n\n"
  132.     @copyfiles-help
  133.   )
  134.   (source "bin")
  135.   (pattern ".#?")
  136.   (dest "S:")
  137.   (confirm)
  138. )
  139. ;}}}
  140. ;}}}
  141.  
  142. (complete 60)
  143.  
  144. ;{{{  binding-files
  145. (if
  146.   (askbool
  147.     (prompt "Do you want to install the binding-files ?")
  148.     (help
  149.       "The binding files are the source files for keybind.\n"
  150.       "You will need them to remake the rc-files.\n\n"
  151.       "You will need them to remake the rc-files.\n\n"
  152.       "If you do not want to change the standard bindings, you can skip this part.\n\n"
  153.       @askbool-help
  154.     )
  155.     (default 0)
  156.   )
  157.   (
  158.     ;{{{  set binddir
  159.     (set binddir
  160.       (askdir
  161.         (prompt "Please select the binding directory.")
  162.         (help
  163.           "The binding files are the source files for keybind.\n"
  164.           "You will need them to remake the rc-files.\n\n"
  165.           "If you do not want to change the standard bindings, you can skip this part."
  166.           @askdir-help
  167.         )
  168.         (newpath)
  169.         (default "S:origami")
  170.       )
  171.     )
  172.     ;}}}
  173.     ;{{{  make binddir if not exists
  174.     (if (not (exists binddir))
  175.       (makedir binddir
  176.         (prompt "Making directory " binddir )
  177.       )
  178.     )
  179.     ;}}}
  180.     ;{{{  make binddir if not exists
  181.     (if (not (exists ("%s/emacs-fun" binddir)))
  182.       (makedir ("%s/emacs-fun" binddir)
  183.         (prompt "Making directory " binddir "\emacs-fun" )
  184.       )
  185.     )
  186.     ;}}}
  187.     ;{{{  make binddir if not exists
  188.     (if (not (exists ("%s/modeori-fun" binddir)))
  189.       (makedir ("%s/modeori-fun" binddir)
  190.         (prompt "Making directory " binddir "\modeori-fun" )
  191.       )
  192.     )
  193.     ;}}}
  194.     ;{{{  copy bindings
  195.     (working "Copying binding files ...")
  196.     (copyfiles
  197.       (source "bindings/amiga.keys")
  198.       (dest binddir)
  199.     )
  200.     (copyfiles
  201.       (source "bindings/emacs.keys")
  202.       (dest binddir)
  203.     )
  204.     (copyfiles
  205.       (source "bindings/fun")
  206.       (pattern "#?")
  207.       (dest binddir)
  208.     )
  209.     (copyfiles
  210.       (source "bindings/emacs-fun")
  211.       (pattern "#?")
  212.       (dest ("%s/emacs-fun" binddir))
  213.     )
  214.     (copyfiles
  215.       (source "bindings/modeori-fun")
  216.       (pattern "#?")
  217.       (dest ("%s/modeori-fun" binddir))
  218.     )
  219.     ;}}}
  220.   )
  221. )
  222. ;}}}
  223.  
  224. (complete 80)
  225.  
  226. ;{{{  set environment variables
  227. ;{{{  ORIPATH
  228. (if (<> (rcdir) ("S:"))
  229.   (
  230.     (textfile
  231.       (dest "ENVARC:ORIPATH")
  232.       (append rcbin)
  233.     )
  234.     (run ("setenv ORIPATH " rcbin))
  235.   )
  236. )
  237. ;}}}
  238.  
  239. (complete 85)
  240.  
  241. ;{{{  ORIARG
  242. (set ststr1
  243.   (askstring
  244.     (prompt "You can now enter your standard options.")
  245.     (help
  246.       "The options a equivalent with the command line options.\n"
  247.       "Some of them like -C are always useful.\n"
  248.       "If you are not familiar with origamis command line options, read the man-page.\n"
  249.       "The options will be stored in the environment variable ORIGAMIOPTS.\n\n"
  250.       @askstring-help
  251.     )
  252.     (default "-C")
  253.   )
  254. )
  255. (if (<> ststr1 "")
  256.   (
  257.     (textfile
  258.       (dest "ENVARC:ORIGAMIOPTS")
  259.       (append ststr1)
  260.     )
  261.     (run ("setenv ORIGAMIOPTS %s" ststr1))
  262.   )
  263. )
  264. ;}}}
  265.  
  266. (complete 90)
  267.  
  268. ;{{{  SHELL
  269. (set ststr2
  270.   (askstring
  271.     (prompt "You can now enter the command to be executed by the create subshell command.")
  272.     (help
  273.       @askstring-help
  274.     )
  275.     (default "newshell Con:0/11/640/200/Shell/Close")
  276.   )
  277. )
  278. (if (<> ststr2 "")
  279.   (
  280.     (textfile
  281.       (dest "ENVARC:SHELL")
  282.       (append ststr2)
  283.     )
  284.     (run ("setenv SHELL %s" ststr2))
  285.   )
  286. )
  287. ;}}}
  288. ;}}}
  289.  
  290. (complete 100)
  291.  
  292. ;{{{  display README.FIRST
  293. (if (exists "Sys:Utilities/more" (noreq))
  294.   (
  295.     (run "run Sys:Utilities/more README.FIRST")
  296.   )
  297.   (
  298.     (message
  299.       "Please read the README.FIRST file !\n"
  300.       "Thanks for installing origami."
  301.     )
  302.   )
  303. )
  304. ;}}}
  305.